package service;

import java.util.List;

import action.vo.IdName;
import action.vo.LoginInfo;

public interface OrgManager {
	
	//prex + objectid,程序内使用subString(5),务必保证prefix定义字符串长度为5
	public static final String ORGN_PREFIX = "Orgn_";
	public static final String ROLE_PREFIX = "Role_";
	public static final String USER_PREFIX = "User_";
	public static final String ROOT_PREFIX = "Root_";
	public static final String FLOW_PREFIX = "Flow_";
	public static final String FORM_PREFIX = "Form_";
	
	public static final String ROOT_TREE_ID = ROOT_PREFIX + "0";
	public static final String ROOT_ORGN_ID = ORGN_PREFIX + "0";
	public static final String ROOT_ROLE_ID = ROLE_PREFIX + "0";
	public static final String ROOT_FLOW_ID = FLOW_PREFIX + "0";
	public static final String ROOT_FORM_ID = FORM_PREFIX + "0";
	
	//获得用户列表
	public List<IdName> getUserListByRole(Object roleid);
	public List<IdName> getUserListByOrg(Object orgid);
	
	//获得角色列表
	public List<IdName> getAllRoleList();
	
	
	//获得部门列表
	public List<IdName> getRootOrgList();
	public List<IdName> getSubOrgList(Object parentid);
	
	
	//获得IdName
	public IdName getRole(Object id);
	public IdName getUser(Object id);
	public IdName getOrgn(Object id);
	
	//其他
	public IdName getUserByUserName(String userName);
	public LoginInfo authUser(String userName,String password);
	
	public List<IdName> getDepartmentMgr(String depid);
	public List<IdName> getUpDepartmentMgr(String depid);
	public List<IdName> findUserList(String participantList);
	public List<IdName> findParticipantList(String participantList);

}
